<?php
if (!isset($_SESSION['user_id'])) {
    require("{$CfgPara->root}/controller/user_login.c.php");
    goto page_end;
}

require_once("{$CfgPara->root}/model/user.m.php");
$myUser = new user_m($CfgPara->database);

// 用户收藏夹显示
if (isset ($InputData['user_collect_folder'])) {
    $tittleText = '收藏夹';
    require("{$viewRoot}tittle_back_bar{$viewEx}");
    require("{$viewRoot}user_collect_folders{$viewEx}");
} // 用户收藏 事件处理
elseif (isset($InputData['collect_id']) && isset($InputData['collect_type'])) {
    $result = $myUser->user_collect_save($InputData['collect_id'], $InputData['collect_type']);
    echo($result);
} // 用户关注 成为粉丝 事件处理
elseif (isset($InputData['user_follow'])) //$InputData['user_follow']内容为被关注者的id
{
    $result = $myUser->user_follow($InputData['user_follow'], $_SESSION['user_id']);
    echo($result);
}

page_end:;